//
//  YHUMimageCell.m
//  LyhToolsTest
//
//  Created by LYH on 2018/10/27.
//  Copyright © 2018年 LYH.com. All rights reserved.
//

#import "YHUMimageCell.h"

@implementation YHUMimageCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self=[super initWithFrame:frame];
    if (self) {
        [self ImageView];
    }
    return self;
}

- (UIImageView *)ImageView
{
    if (!_ImageView) {
        _ImageView = [[UIImageView alloc]init];
        _ImageView.contentMode = UIViewContentModeScaleAspectFit;
        _ImageView.clipsToBounds = YES;//裁剪
        [self.contentView addSubview:_ImageView];
        [_ImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.center.equalTo(self.contentView);
            make.size.mas_equalTo(CGSizeMake(40, 40));
        }];
    }
    return _ImageView;
}
@end
